/*路由创建*/
import Vue from "vue";
import VueRouter from "vue-router";
import StudentView from "@/components/StudentView.vue";
import TeacherView from "@/components/TeacherView.vue";

/*创建路由列表*/
// 扩展vue的路由功能
Vue.use(VueRouter)

let routes = [
    {
        path: '/student',
        component: StudentView,
        name: 'student'
    },
    {
        path: '/teacher',
        component: TeacherView,
        name: 'teacher'
    }
]

// 创建路由对象
let router = new VueRouter({
    routes
})

export default router








